package com.sharpjvm.interpreter.runtime.heap;

import java.util.EventObject;

/**
 * Created with IntelliJ IDEA.
 * User: zhuguoyin
 * Date: 13-3-8
 * Time: 下午10:10
 * To change this template use File | Settings | File Templates.
 */
public class HeapChangerEvent extends EventObject {

    public static final int TYPE_PUT_IN = 1;

    public static final int TYPE_REMOVE = 2;

    private byte[] reference;

    private int type;

    private HeapObjectContainer heapObjectContainer;

    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException
     *          if source is null.
     */
    public HeapChangerEvent(Object source) {
        super(source);
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public HeapObjectContainer getHeapObjectContainer() {
        return heapObjectContainer;
    }

    public void setHeapObjectContainer(HeapObjectContainer heapObjectContainer) {
        this.heapObjectContainer = heapObjectContainer;
    }

    public byte[] getReference() {
        return reference;
    }

    public void setReference(byte[] key) {
        this.reference = key;
    }
}
